﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;
using PServiceBus.Core.Interface;
using PServiceBus.Core.Runtime.Topics;
using PServiceBus.Core.Manager;
using System.Text.RegularExpressions;
using PServiceBus.Core.Runtime.Transports;

namespace PServiceBus.Core.Subscription
{
    /// <summary>
    /// Base implementation of ISubscriber
    /// </summary>
    [Serializable]
    public sealed class Subscriber : ISubscriber
    {
        #region ISubscriber Members

        public string Name { get; set; }

        public Guid ID { get; set; }

        public IList<TransportInfo> Transports { get; set; }
        public Subscriber() { }
        public Subscriber(Guid id, string name, IList<SubscriptionEntry> subscriptions)
        {
            ID = id;
            Name = name;
            Subscriptions = subscriptions;
            Transports = new List<TransportInfo>();
        }

        public Subscriber(string name) : this(Guid.Empty, name, new List<SubscriptionEntry>()) { }
        public Subscriber(Guid id, string name) : this(id, name, new List<SubscriptionEntry>()) { }

        public IList<SubscriptionEntry> Subscriptions { get; set; }

        public bool Durable { get; set; }
        #endregion
    }

}
